package com.googlecode.gwt4gae.client;

import java.io.Serializable;
import java.util.List;

import com.google.gwt.user.client.rpc.RemoteService;

public interface IBaseService<E extends Serializable> extends RemoteService {
	/**
	 * Persist entity.
	 * @param entity
	 */
	public void persist(E entity);
	
	/**
	 * Persist one or more entity
	 * @param entities
	 */
	public void persistBatch(List<E> entities);
	
	/**
	 * Update entity.
	 * @param entity
	 */
	public void update(E entity);
	
	/**
	 * Update one or more entity
	 * @param entities
	 */
	public void updateBatch(List<E> entities);
	
	/**
	 * Remove entity.
	 * @param entity
	 */
	public void remove(E entity);
	
	/**
	 * Remove one or more entity
	 * @param entities
	 */
	public void removeBatch(List<E> entities);
	
}
